import request from '@/utils/request'

// 查询农户基本信息列表
export function listFarmer(query) {
    return request({
        url: '/NH/farmer/list',
        method: 'get',
        params: query
    })
}

// 查询农户基本信息详细
export function getFarmer(id) {
    return request({
        url: '/NH/farmer/' + id,
        method: 'get'
    })
}

// 新增农户基本信息
export function addFarmer(data) {
    return request({
        url: '/NH/farmer',
        method: 'post',
        data: data
    })
}

// 修改农户基本信息
export function updateFarmer(data) {
    return request({
        url: '/NH/farmer',
        method: 'put',
        data: data
    })
}
// 转移农户
export function TransferFarmer(data) {
    return request({
        url: '/NH/farmer/transfer',
        method: 'put',
        data: data
    })
}
// 删除农户基本信息
export function delFarmer(id) {
    proxy.$modal.msgSuccess("删除成功");
    return request({
        url: '/NH/farmer/' + id,
        method: 'delete'
    })
}

// 删除农户户主基本信息
export function delHuZhu(data) {
    console.log("删除了信息为"+data.value+"的户主")
    return 0
    // proxy.$modal.msgSuccess("删除成功");
    // return request({
    //     url: '/NH/farmer/delHuZhu' + id,
    //     method: 'delete'
    // })
}

export function transferHuZhu(data) {
    console.log("转移"+data.value+"的户主")
    return 0
    // proxy.$modal.msgSuccess("删除成功");
    // return request({
    //     url: '/NH/farmer/delHuZhu' + id,
    //     method: 'delete'
    // })
}

export const conNatVillageList = reactive([
    {index: 0, listValue: '啦啦啦'},
    {index: 1, listValue: '大六合'},
    {index: 2, listValue: '后六合'},
    {index: 3, listValue: '姜家瑶'},
    {index: 4, listValue: '六家子东'},
    {index: 5, listValue: '六家子西'},
    {index: 6, listValue: '龙凤泡'},
    {index: 7, listValue: '西石头'},
    {index: 8, listValue: '小舍力'}
])
export const conRelationshipList = reactive([
    {index: 0, listValue: '哈哈哈'},
    {index: 1, listValue: '户主'},
    {index: 2, listValue: '配偶'},
    {index: 3, listValue: '之子'},
    {index: 4, listValue: '之女'},
    {index: 5, listValue: '之父'},
    {index: 6, listValue: '之母'},
    {index: 7, listValue: '之儿媳'},
    {index: 8, listValue: '之孙子'},
    {index: 9, listValue: '之孙女'},
    {index: 10,listValue: '之外孙子'}
])
export const conHealthConditionList = reactive([
    {index: 0, listValue: '啦啦啦'},
    {index: 1, listValue: '健康'},
    {index: 2, listValue: '残疾'},
    {index: 3, listValue: '长期慢性病'},
    {index: 4, listValue: '残疾、患有大病'},
    {index: 5, listValue: '残疾、长期慢性病'}
])
export const conLaborSkillList = reactive([
    {index: 0, listValue: '啦啦啦'},
    {index: 1, listValue: '普通劳动力'},
    {index: 2, listValue: '弱劳动力或半劳动力'},
    {index: 3, listValue: '丧失劳动力'},
    {index: 4, listValue: '无劳动力'}
])
export const conPovertyCauseList = reactive([
    {index: 0, listValue: '啦啦啦'},
    {index: 1, listValue: '因病'},
    {index: 2, listValue: '因残'},
    {index: 3, listValue: '因学'},
    {index: 4, listValue: '缺技术'},
    {index: 5, listValue: '缺劳力'},
    {index: 6, listValue: '缺土地'},
    {index: 7, listValue: '自身发展动力不足'}
])
export const conFamilyTypeList = reactive([
    {index: 0, listValue: '啦啦啦'},
    {index: 1, listValue: '脱贫户'},
    {index: 2, listValue: '脱贫不稳定户'},
    {index: 3, listValue: '边缘易致贫户'},
    {index: 4, listValue: '突发严重困难户'},
    {index: 5, listValue: '一般户'}
])
export const conEducationDegreeList = reactive([
    {index: 0, listValue: '啦啦啦'},
    {index: 1, listValue: '文盲或半文盲'},
    {index: 2, listValue: '小学'},
    {index: 3, listValue: '初中'},
    {index: 4, listValue: '高中'},
    {index: 5, listValue: '大专'}
])





